import {NestFactory} from '@nestjs/core';
import {AppModule} from './app/module';
import {registerInstance} from './nacosClient';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.enableShutdownHooks();
  const instance = await registerInstance();
  console.log('start app with port', instance.port);
  await app.listen(instance.port);
}

bootstrap();
